package com.banggood.upms.service.AuditLog;

import com.banggood.silk.web.api.exception.SkbException;
import com.banggood.upms.bean.po.AuditLog;
import com.banggood.upms.bean.vo.search.BaseSearchCriteria;
import com.banggood.upms.dao.AuditLogDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author XuChuangFeng
 * @date 2017/7/27
 */
@Service
@Transactional(rollbackFor = SkbException.class)
public class AuditLogServiceImpl implements AuditLogService {

    @Autowired
    private AuditLogDao auditLogDao;

    @Override
    public int deleteByPrimaryKey(String id) {
        return auditLogDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(AuditLog record) throws Exception {
        return auditLogDao.insert(record);
    }

    @Override
    public AuditLog selectByPrimaryKey(String id) {
        return auditLogDao.selectByPrimaryKey(id);
    }

    @Override
    public List<AuditLog> selectAll() {
        return auditLogDao.selectAll();
    }

    @Override
    public int updateByPrimaryKey(AuditLog record) {
        return auditLogDao.updateByPrimaryKey(record);
    }

    @Override
    public List<AuditLog> selectByCriteria(BaseSearchCriteria criteria) {
        return auditLogDao.selectByCriteria(criteria);
    }
}
